package com.xiaoyg.proxy.jdk;


import org.junit.Test;

public class JdkDynamicProxyPatternTest {

    @Test
    public void jdkDynamicProxyPatternTest(){
        IHelloService helloService = new HelloServiceImpl();

        IHelloService proxy = (IHelloService) new JdkDynamicProxy(helloService).newProxyInstance();

        proxy.sayHello();
    }

}
